package oop3;

import java.util.Scanner;

public class Circle {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.print("输入圆的半径:");
        radius = input.nextInt();
        Circle circle = new Circle();
        System.out.println("圆的面积为：" + (int) (circle.getArea() * 100) / 100.0);
        System.out.println("圆的周长为：" + circle.getRound());
    }

    private static double radius;
    private static final double PI = 3.14;
    double area, round;

    public static void setRadius(double radius) {
        Circle.radius = radius;
    }

    double getArea() {
        area = PI * radius * radius;
        return area;
    }

    double getRound() {  //周长
        round = 2 * PI * radius;
        return round;
    }

}
